import java.util.*;

public class Text1 {
//    List<Integer> list=new ArrayList<>();
//    List<Integer> list1=new LinkedList<>();

public static void main2(String[] args) {
    Stack<Integer> stack=new Stack<>();
}
public static void main(String[] args) {
    Deque<Integer>deque1=new ArrayDeque<>();
    deque1.offer(77);
    deque1.offer(66);
    deque1.offer(55);
    Deque<Integer>deque=new ArrayDeque<>();
    deque.offer(1);
    deque.offer(4);
    deque.offer(8);
    deque.offer(6);
    deque.offer(9);
    deque.addFirst(99);
    deque.addLast(88);
    deque.push(100);
    deque.pop();
    System.out.println(deque.peek());

    //deque.addAll(deque1);

}
public static void main1(String[] args) {
//    Queue<Integer>queue=new LinkedList<>();
//    queue.offer(12);
//    queue.offer(3);
//    queue.offer(5);
//    queue.offer(8);
//    queue.offer(10);
//    queue.remove();
//    queue.poll();
//    System.out.println(queue.peek());
//    System.out.println("==================");
    Queue<Integer>queue1=new LinkedList<>();
    System.out.println(queue1.poll());
    System.out.println(queue1.peek());
    System.out.println(queue1.offer(1));//如果已满队列中增加一个新元素，返回false
    queue1.add(1);//如果已满抛出异常
    queue1.remove();//抛出异常
    queue1.element();//抛出异常
    queue1.stream();


}

}
